package it.maganar.lesscaos.util;

import java.sql.Date;
import java.sql.Time;
import java.util.GregorianCalendar;

public class GCInitializer {
	
	/**
	 * 
	 * @param day
	 * @param month valori da 0 a 11
	 * @param year
	 * @return
	 */
	static public Date dateInitializer(int day, int month, int year){
		GregorianCalendar gc = new GregorianCalendar();
		gc.clear();
		gc.set(year, month, day);
		return new Date(gc.getTimeInMillis());
	}
	
	static public Time timeInitializer (int hour, int minute){
		GregorianCalendar gc = new GregorianCalendar();
		gc.clear();
		gc.set(GregorianCalendar.HOUR_OF_DAY, hour);
		gc.set(GregorianCalendar.MINUTE, minute);
		return new Time(gc.getTimeInMillis());
	}

}
